const Router = require("koa-router");
const db = require("../../sql/mysql");
let router = new Router();

router.post("/api/del", async (ctx) => {
  console.log(ctx.request.body);
  let { pageNum, pageSize, id } = ctx.request.body;
  let where = {
    id,
  };

  let result = await db.delete("activity", where);

  ctx.body = {
    result,
  };
});

module.exports = router;
